package com.example.julienandroid;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;

public class Act2 extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_act2);
		Button fin=(Button) findViewById(R.id.fin);
		fin.setOnClickListener(btnclick);
		Bundle b = getIntent().getExtras();
		String param1 = b.getString("param1");
		int param2=b.getInt("param2");
		Toast.makeText(getApplicationContext(), param1+
		Integer.toString(param2),Toast.LENGTH_LONG).show();
	}
	private OnClickListener btnclick = new OnClickListener() {
		public void onClick(View v) {
			switch (v.getId()) {
			case R.id.fin:
				Toast.makeText(getApplicationContext(), "clic sur fin",Toast.LENGTH_LONG).show();
				finish();
				break;
			}
		}
	};
}
